// The Vue build version to load with the `import` command
// (runtime-only or standalone) has been set in webpack.base.conf with an alias.
import Vue from 'vue'
import App from './App'
import router from '@/router'
import TypeNav from '@/pages/Home/TypeNav'
import store from '@/store'
import "@/mock/mockServe"
import "swiper/css/swiper.css"
import Carousel from "@/components/Carousel"
import Pagination from "@/components/Pagination"
import * as API from '@/api'
import myPlugins from '@/plugins/myPlugins'
import atm from '@/assets/atm.gif'
import VueLazyload from 'vue-lazyload'
import "@/plugins/validate"
import ElementUI from 'element-ui'
import 'element-ui/lib/theme-chalk/index.css'

Vue.component(TypeNav.name, TypeNav)
Vue.component(Carousel.name, Carousel)
Vue.component(Pagination.name, Pagination)

Vue.config.productionTip = false

Vue.use(VueLazyload, {
  loading: atm
})

Vue.use(myPlugins, {
  name: 'upper'
})

Vue.use(ElementUI)

/* eslint-disable no-new */
new Vue({
  el: '#app',
  beforeCreate() {
    Vue.prototype.$bus = this
    Vue.prototype.$API = API
  },
  router,
  store,
  components: { App },
  template: '<App/>'
})
